package com.authine.cloudpivot.ext.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import javax.ws.rs.GET;
import java.util.Arrays;
import java.util.Map;
import java.util.stream.Collectors;

/**
 * @author wangning
 */



@Getter
@AllArgsConstructor
public enum ExportInventedEnum {
    NOT_QUOTED("notQuoted","未报价"),
    NOT_INVOLVED("not_involved","未参与报价");
    private String  code;
    private String desc;



    public static  String getDesc(String code){
        Map<String, String> collect = Arrays.stream(ExportInventedEnum.values()).
                collect(Collectors.toMap(ExportInventedEnum::getCode, ExportInventedEnum::getDesc, (x1, x2) -> x1));
        String desc = collect.get(code);
        return desc;
    }


}
